Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add 4.2-stable.expected file for GDExtension compatibility checks #85748

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Dec 4, 2023

Adds the editor hint for --validate-extension-api to match --dump-extension-api, otherwise we're missing the EditorInterface singleton.

@AThousandShips
Copy link
Member

AThousandShips commented Dec 4, 2023

Should the 4.1 file be renamed like the 4.0 one was?

@akien-mga akien-mga force-pushed the extension-check-add-4.2-expected-changes branch from 96017c7 to 7644db9 Compare December 4, 2023 21:29
@akien-mga
Copy link
Member Author

We have the following errors:

2023-12-04 16:18:27 URL:https://raw.githubusercontent.com/godotengine/godot-cpp/godot-4.2-stable/gdextension/extension_api.json [5501700/5501700] -> "/tmp/tmp.WdNiCBDP1l" [1]
Godot Engine v4.3.dev.mono.custom_build.156b07f14 - https://godotengine.org/
 
Error: Validate extension JSON: API was removed: singletons/EditorInterface

2023-12-04 16:18:27 URL:https://raw.githubusercontent.com/godotengine/godot-cpp/godot-4.0-stable/gdextension/extension_api.json [5175722/5175722] -> "/tmp/tmp.EoFQLdx9mx" [1]
Godot Engine v4.3.dev.mono.custom_build.156b07f14 - https://godotengine.org/
 
ERROR: New API lacks base array: enums
   at: compare_dict_array (core/extension/extension_api_dump.cpp:1350)
2023-12-04 16:18:28 URL:https://raw.githubusercontent.com/godotengine/godot-cpp/godot-4.1-stable/gdextension/extension_api.json [5318978/5318978] -> "/tmp/tmp.MBIcrUqT41" [1]
Godot Engine v4.3.dev.mono.custom_build.156b07f14 - https://godotengine.org/
 
ERROR: New API lacks base array: enums
   at: compare_dict_array (core/extension/extension_api_dump.cpp:1350)

The New API lacks base array: enums errors are also reproducible in the current master branch, and don't seem to mark the check as failed.

API was removed: singletons/EditorInterface is new from adding the 4.2-stable file though. From a quick look I don't understand why it's raised. Both the 4.2-stable and the API json generated by my local build have that entry, yet I get this error.

CC @RedworkDE

@akien-mga akien-mga marked this pull request as draft December 4, 2023 21:32
@AThousandShips
Copy link
Member

AThousandShips commented Dec 4, 2023

Could it be related in some way to that the version tag is updated after that? The .json file in godot-cpp (for the master branch) is from the 4.2 branch pre updating to 4.3-dev, unsure if it is used in the comparison for this

The relevant file in godot-4.1-stable on godot-cpp is for version 4.1, so that's a point of difference

@akien-mga
Copy link
Member Author

The script downloads the json from the godot-cpp tag of the version in the filename (first one if it's a range), so it should be comparing 4.3-dev (this PR) with 4.2-stable.
https://github.com/godotengine/godot/blob/master/misc/scripts/validate_extension_api.sh#L58-L61

@AThousandShips

This comment was marked as outdated.

@akien-mga akien-mga force-pushed the extension-check-add-4.2-expected-changes branch from 7644db9 to 627530a Compare December 7, 2023 08:16
@akien-mga akien-mga marked this pull request as ready for review December 7, 2023 08:16
@akien-mga akien-mga requested a review from a team as a code owner December 7, 2023 08:16
@akien-mga akien-mga force-pushed the extension-check-add-4.2-expected-changes branch from 627530a to cff4af0 Compare December 7, 2023 08:37
OS::get_singleton()->set_exit_code(valid ? EXIT_SUCCESS : EXIT_FAILURE);
return false;
if (validate_extension_api) {
Engine::get_singleton()->set_editor_hint(true); // "extension_api.json" should always contains editor singletons.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the issue that singletons/EditorInterface was missing in the API generated by --validation-extension-api, thus failing the comparison with the file generated by --dump-extension-api, which uses editor hint.

The rest is just a cosmetic change to keep GDExtension stuff visually grouped together.

@akien-mga akien-mga merged commit 3663f6f into godotengine:master Dec 7, 2023
15 checks passed
@akien-mga akien-mga deleted the extension-check-add-4.2-expected-changes branch December 7, 2023 09:23
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text at this file should be changed to be in sync with the 4.0->4.1 file. I updated #76560 to include this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants